package com.xyy.saas.payment.adpater.yzh.vo;


import com.xyy.saas.payment.adpater.yzh.BasePay;
import com.xyy.saas.payment.adpater.yzh.constant.ConfigPath;
import com.xyy.saas.payment.util.JSONUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Slf4j
public class OrderQuery extends BasePay<OrderQueryRequest> {

    private String payNo;
    private String method;

    @Override
    public OrderQueryRequest assembleParam() {
        OrderQueryRequest orderQueryRequest = OrderQueryRequest.builder()
                .order_id(payNo)
                .channel(ConfigPath.HY_WX_PAY.equals(method) ? "微信" : "银行卡")
                .data_type("encryption")
                .build();
        log.info("OrderQueryRequest#assembleParam:{}", JSONUtils.toJSON(orderQueryRequest));
        return orderQueryRequest;
    }

}
